//index.js
Page({
  data: {
    imgs: [
      { url: '../image/banner-1.png' },
      { url: '../image/banner-2.png' },
      { url: '../image/banner-1.png' }
    ],
    currentSwiper: 0,
    autoplay: true,
    interval:3000,
    showView: false,
    state: false
  },
  // 轮播图指示点
  swiperChange: function (e) {
    this.setData({
      currentSwiper: e.detail.current
    })
  },
  // 页面跳转
  skip: function () {
    wx.navigateTo({
      url: '../article/article'
    })
  },
  onLoad: function (options) {
    // 生命周期函数--监听页面加载
    showView: (options.showView == "true" ? true : false)
  },
  // 简介显示隐藏
  synopsisMore: function () {
    var list_state = this.data.state,
      first_state = this.data.showView;
    if (!first_state) {
      this.setData({
        showView: true
      });
    } else {
      this.setData({
        showView: false
      });
    }
    if (list_state) {
      this.setData({
        state: true
      });
    } else {
      this.setData({
        state: true
      });
    }
  },
  // 分享小程序
  onShareAppMessage: function () {
    return {
      title: '专业的移动电子商务解决方案服务商',
      path: '/pages/index/index',
      imageUrl: '/pages/image/logo.png'
    }
  }
})